package io.qar.rawMaterialsConfig.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.qar.commons.tools.utils.DateUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import io.qar.commons.mybatis.dto.CreateAndUpdatedDTO;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
* 原材料配置表
*
* @author yyyyjinying 1020066395@qq.com
* @since 3.0 2024-07-21
*/
@Data
@ApiModel(value = "原材料配置表")
public class RawMaterialsConfigDTO extends CreateAndUpdatedDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "原材料配置的唯一标识符")
    private Long configId;
    @ApiModelProperty(value = "菜品ID，关联到菜单表中的菜品")
    private Long dishId;
    @ApiModelProperty(value = "原材料名称")
    private String materialName;
    @ApiModelProperty(value = "原材料的规格，使用JSON格式存储")
    private String materialSpecification;
    @ApiModelProperty(value = "计量单位，如克、升、件等")
    private String unitOfMeasure;
    @ApiModelProperty(value = "每单位菜品所需的原材料数量")
    private BigDecimal quantity;
    @ApiModelProperty(value = "供应商ID，关联到供应商表")
    private Long supplierId;
    @ApiModelProperty(value = "原材料应满足的质量标准")
    private String qualityStandard;

    private Integer isDelete;
    @ApiModelProperty(value = "原材料的单价")
    private BigDecimal costPerUnit;
    @ApiModelProperty(value = "原材料的总成本，基于数量和单价计算得出")
    private BigDecimal totalCost;
    @ApiModelProperty(value = "可替代的原材料列表，使用JSON格式存储")
    private String alternativeMaterials;
    @ApiModelProperty(value = "原材料的有效期或保质期")
    @JsonFormat(pattern = DateUtils.DATE_PATTERN)
    private Date expirationDate;
    @ApiModelProperty(value = "关于原材料的任何附加说明或备注")
    private String notes;
//    @ApiModelProperty(value = "记录原材料配置创建的时间")
//    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
//    private Date createdAt;
//    @ApiModelProperty(value = "记录原材料配置最后更新的时间")
//    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
//    private Date updatedAt;

}